﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/admin/admin.master" AutoEventWireup="true" CodeBehind="ActivityNewsAdd.aspx.cs" Inherits="web.admin.ActivityNewsAdd" 
    Title="活动新闻添加" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script language="javascript" type="text/javascript" src="../JavaScripts/common.js"></script>
    <table class="SubMenu_Item" cellspacing="0" cellpadding="0" width="100%" border="0">
        <tbody>
            <tr>
                <td>
                    <table cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                            <tr>
                                <td class="Current_Item" id="TD1"><a href="ActivityNews.aspx">活动新闻列表</a></td>
                                <td class="Default_Item" id="TD2"><a href="ActivityNewsAdd.aspx">添加活动新闻</a></td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>

    <table cellspacing="0" cellpadding="0" width="100%" border="0">
        <tbody>
	        <tr>
	            <td>
	                <asp:Label ID="errorMsg" Visible="false" Text="" runat="server" ForeColor="red"/>
                    <asp:DetailsView ID="activityNewsInfo" runat="server" AutoGenerateRows="False" SkinID="orange" DataKeyNames="Id" 
                        DefaultMode="Insert"  OnDataBound="DataBound">
                        <Fields>
                            <asp:TemplateField HeaderText="标题：" >
                                <InsertItemTemplate>
                                    <asp:TextBox ID="title" runat="server" width="300" />
                                </InsertItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="关键字：" >
                                <InsertItemTemplate>
                                    <asp:TextBox ID="keyword" runat="server" width="150" />
                                </InsertItemTemplate>
                            </asp:TemplateField>                             
 
                            <asp:TemplateField HeaderText="是否包含图片：">
                                <InsertItemTemplate>
                                    <asp:RadioButtonList ID="hasImage" runat="server" AutoPostBack="true" OnSelectedIndexChanged="IsHasImageChanged">
                                        <asp:ListItem Text="是" Value="1"/>
                                        <asp:ListItem Text="否" Value="0"/>
                                   </asp:RadioButtonList>
                                </InsertItemTemplate>
                            </asp:TemplateField>                            
                            <asp:TemplateField HeaderText="图片url：" >
                                <InsertItemTemplate>
                                    <asp:TextBox ID="imagePath" runat="server" width="300" />
                                </InsertItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="简介：" >
                                <InsertItemTemplate>
                                    <asp:TextBox ID="introduction" runat="server" TextMode="MultiLine" width="450" height="50" />
                                </InsertItemTemplate>
                            </asp:TemplateField>                            
                            <asp:TemplateField HeaderText="举办时间：" >
                                <InsertItemTemplate>
                                    从<asp:TextBox ID="startTime" runat="server" width="70"/> --
                                    到<asp:TextBox ID="endTime" runat="server" width="70" />
                                    &nbsp; 时间格式如: 2008-06-05
                                </InsertItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="举办地点：" Visible="false">
                                <InsertItemTemplate>
                                    <asp:TextBox ID="area" runat="server" width="200" />
                                </InsertItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="要求人数：" Visible="false">
                                <InsertItemTemplate>
                                    <asp:TextBox ID="dimensions" runat="server" width="20" Text="  人"/>
                                </InsertItemTemplate>
                            </asp:TemplateField>                            
                            <asp:TemplateField HeaderText="活动内容：">
                                <InsertItemTemplate>
                                    <asp:TextBox id="body" runat="server" style="DISPLAY:none" ></asp:TextBox>
			                        <iframe id="form2" src="../ewebeditor/ewebeditor.htm?id=body&style=coolblue" frameborder="0" scrolling="no" 
			                            width="650" height="350">
			                        </iframe>                                
			                    </InsertItemTemplate>
                            </asp:TemplateField>  
                            <asp:TemplateField>
                                 <InsertItemTemplate>
                                    <asp:Button ID="InsertButton" runat="server"  CausesValidation="True" Text="添加" OnClick="InsertButton_click"/> &nbsp;
                                    <asp:Button ID="InsertCancelButton" runat="server" CausesValidation="False" Text="取消" OnClick="CancelButton_click"/>
                                </InsertItemTemplate>
                            </asp:TemplateField>
                        </Fields>
                    </asp:DetailsView>
                </td>
	        </tr> 	    
	    </tbody>
    </table>	        
</asp:Content>
